package com.mihoyo.service.impl;

import com.mihoyo.domain.Store;
import com.mihoyo.mapper.StoreMapper;
import com.mihoyo.service.StoreService;
import com.mihoyo.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class StoreServiceImpl implements StoreService {

    @Value("${server.port}")
    private String port;

    @Autowired
    private StoreMapper storeMapper;
    @Override
    public AjaxResult add(Store store) {
        storeMapper.add(store);
        AjaxResult ajaxResult = AjaxResult.me().success();
        ajaxResult.setMessage("添加成功"+port);
        return ajaxResult;
    }
}
